//
//  RBEncryption.h
//  RBDemoProj
//
//  Created by Lan on 2019/2/15.
//  Copyright © 2019年 SummerTea. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface RBEncryption : NSObject

/*
 AES->
 加密方式:CBC
 填充:PKCS7Padding
 数据块:128位
 密码:16/24/32
 偏移量:16
 字符集:utf8
 */
/** 输入utf8,输出base64 */
+ (NSString *)aesEncrypt: (NSString *)text;
/** 输入base64,输出utf8 */
+ (NSString *)aesDecrypt: (NSString *)text;

/** 输入utf8,输出base64 */
+ (NSString *)rsaPublicKeyEncrypt: (NSString *)text;
/** 输入base64,输出utf8 */
+ (NSString *)rsaPublicKeyDecrypt: (NSString *)text;

/** 输入utf8,输出base64 */
+ (NSString *)rsaPrivateKeyEncrypt: (NSString *)text;
/** 输入base64,输出utf8 */
+ (NSString *)rsaPrivateKeyDecrypt: (NSString *)text;

+ (NSString *)rsaPublicKey;
+ (NSString *)rsaPrivateKey;

@end
